package com.panhu.yidianmall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.panhu.common.utils.PageUtils;
import com.panhu.yidianmall.member.entity.MemberEntity;
import com.panhu.yidianmall.member.exception.PhoneExistException;
import com.panhu.yidianmall.member.exception.UserNameExistException;
import com.panhu.yidianmall.member.vo.MemberLoginVo;
import com.panhu.yidianmall.member.vo.MemberRegistVo;

import java.util.Map;

/**
 * 会员
 *
 * @author panhu
 * @email 1497767287@qq.com
 * @date 2021-02-22 10:35:48
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegistVo vo);
    /**
     * 判断邮箱是否重复
     * @param phone
     * @return
     */
    void checkPhoneUnique(String phone) throws PhoneExistException;

    /**
     * 判断用户名是否重复
     * @param userName
     * @return
     */
    void checkUserNameUnique(String userName) throws UserNameExistException;

    /**
     * 用户登录
     * @param vo
     * @return
     */
    MemberEntity login(MemberLoginVo vo);

    /**
     * 社交用户的登录
     * @param socialUser
     * @return
     */
//    MemberEntity login(SocialUser socialUser) throws Exception;

    /**
     * 微信登录
     * @param accessTokenInfo
     * @return
     */
//    MemberEntity login(String accessTokenInfo);
}

